<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}

<div class="x-nav" style="height: 45px;">
	<span class="layui-breadcrumb">
		<a>首页</a>
		<a>彩票管理</a>
		<a>邀请码</a>
	</span>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
		<i class="layui-icon" style="line-height:30px">ဂ</i>
	</a>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 0 0;float:right" href="{U('user/invita', array('operation'=>'add_view'))}">
		<i class="layui-icon" style="line-height:30px;">创建邀请码</i>
	</a>
</div>

<div class="x-body">
	<form class="layui-form ajaxform" action="?" method="post">
		<input type="hidden" name="m" value="{$m}" />
		<input type="hidden" name="c" value="{$c}" />
		<input type="hidden" name="a" value="" />
		<table class="layui-table">
			<thead>
				<tr>
					<th width="10%">邀请码</th>
					<th width="10%">类型</th>
					<th width="10%">重复使用</th>
					<th width="20%">备注</th>
					<th width="20%">创建时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				{loop $codeList as $k => $v}
					<tr>
						<td>{$v['invita_code']}</td>
						<td>{if $v['type'] == 1} 代理 {else} 玩家 {/if}</td>
						<td>{if $v['is_once']} 重复 {else} 单次 {/if}</td>
						<td>{$v['remark']}</td>
						<td>{date('Y-m-d H:i:s', $v['createtime'])}</td>
						<td></td>
					</tr>
				{/loop}
			</tbody>
		</table>
		<div class="clearfix">
			<div id="pages" class="layui-laypage right">{$multi}</div>		
		</div>
	</form>
</div>

{template index/footer}